/* 逾期信息  */
var firstYuqiList = true;
var getYuqiList = function(url){
	if(firstYuqiList) {
		firstYuqiList = false;
		winWidth = $(window).width();
	   	winHeight = $(window).height() / 2.5;
	   	var win = winWidth /10 - 20;
	    $.jgrid.defaults.styleUI = 'Bootstrap';
	    var i = 0;
		$("#table_list_3").jqGrid({
			postData:{busiId:busiId},
			url:url,
	       	datatype : "json",
		    colNames : ['客户姓名','期号','身份证号', '月还款额','签约贷款额', '持卡人手费费', '剩余金额', '卡余额','连续违约次数','累计违约次数'],
		    colModel : [ 
	             {name: 'cusName',index: 'cusName',width: win,align: "left"},
	             {name: 'splaceId',index: 'dateOverdue',width: win,align: "left",formatter:function(a,b,c){
	            	 return ++i;
	             }},
	             {name: 'cusIdno',index: 'cusIdno',width: win,align: "left"},
	             {name: 'amountMonthly',index: 'amountMonthly',width: win,align: "left",formatter:function(a,b,c){
	            	 return showNumber(a);
	             }},
	             {name: 'loanAmount',index: 'loanAmount',width: win,align: "left",formatter:function(a,b,c){
	            	 return showNumber(a);
	             }},
	             {name: 'feeTotal',index: 'feeTotal',width: win,align: "left",formatter:function(a,b,c){
	            	 return showNumber(a);
	             }},
	             {name: 'amountRemainder',index: 'amountRemainder',width: win,align: "left",formatter:function(a,b,c){
	            	 return showNumber(a);
	             }},
	             {name: 'balanceCard',index: 'balanceCard',width: win,align: "left",formatter:function(a,b,c){
	            	 return showNumber(a);
	             }},
	             {name: 'overdueCountContinuous',index: 'overdueCountContinuous',width: win,align: "left"},
	             {name: 'overdueCountTotal',index: 'overdueCountTotal',width: win,align: "left"}
	             ],
	           mtype : "post",
	           height: winHeight,
	           autowidth: true,
	           shrinkToFit: true,
	           rowNum: 30,
	           rowList: [30, 60, 90, 120, 150],
	           viewrecords: true,
	           hidegrid: false,
	           multiselect : false,
	           multiboxonly:false,  
	           beforeSelectRow: false,
	           jsonReader: {
	                root: "result.rows",
	                page: "result.page",
	                total: "result.total",
	                records: "result.records",
	                repeatitems: false,
	                id: "replaceId"
	          },
	          loadComplete:function(datas){
	        	  	i = 0;
	        	  	 if (datas.flag == "100100") {
	                     layer.msg("查询成功!", {icon: 6, time: 1000});
	                     return;
	                 }
	            	if(datas.flag == '100802') {
	  				  top.location.href = thisLoginUrl;
	  				  return;
	  			  	}
	          	  	layer.msg(datas.message, {icon: 2});
	          }
	  });
	} else {
		 var postData = $("#table_list_3").jqGrid("getGridParam", "postData");
 		 $.extend(postData, {busiId:busiId});
         $("#table_list_3").jqGrid("setGridParam", { search: true }).trigger("reloadGrid", [{ page: 1}]);
	}
}